var windowNameIndex = parent.layer.getFrameIndex(window.name);
openAddNature = function() {
    var index = parent.layer.open({
        type: 2,
        title: '添加到店客户',
        area: ['75%', '95%'],
        fix: true,
        maxmin: true,
        content: Feng.ctxPath + '/customer/to_nature_courtyard_add/' + document.getElementById("customerPhone").value,
        success: function(layero, index) {
            parent.layer.close(windowNameIndex)
        }
    });
    this.layerIndex = index
};
customerReconsulting = function(id) {
    var index = parent.layer.open({
        type: 2,
        title: '患者重咨',
        area: ['40%', '50%'],
        fix: true,
        maxmin: true,
        content: Feng.ctxPath + '/customer/to_reconsulting/' + id,
        success: function(layero, index) {
            parent.layer.close(windowNameIndex)
        }
    });
    this.layerIndex = index
};
customer_multiple = function(phone, id) {
    var customerPhone = phone.split("+")[0];
    var index = parent.layer.open({
        type: 2,
        title: '新建一人多号',
        area: ['75%', '95%'],
        fix: true,
        maxmin: true,
        content: Feng.ctxPath + '/customer/customer_multiple/' + customerPhone + '/' + id,
        success: function(layero, index) {
            parent.layer.close(windowNameIndex)
        }
    });
    this.layerIndex = index
};
insertReDiagnosis = function(id) {
    var index = parent.layer.open({
        type: 2,
        title: '复诊预约',
        area: ['70%', '95%'],
        fix: true,
        maxmin: true,
        content: Feng.ctxPath + '/doctorLooked/subsequent_info2/' + id + '/1',
        success: function(layero, index) {
            parent.layer.close(windowNameIndex)
        }
    });
    this.layerIndex = index
};
isComeToday = function(customerId) {
    var index = parent.layer.open({
        type: 2,
        title: '添加到店客户',
        area: ['75%', '95%'],
        fix: true,
        maxmin: true,
        content: Feng.ctxPath + '/customer/customer_add/' + customerId,
        success: function(layero, index) {
            parent.layer.close(windowNameIndex)
        }
    });
    this.layerIndex = index
};
$(function() {
    if ($("#size").val() != '0') {
        $("#addCus").hide()
    }
});